-- GENERATED SPELL FOR [Risen Bonewarder] --


function spell0_10491(pUnit, Event) --@Bone Armor,n/a--
pUnit:FullCastSpellOnTarget(16431,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10491', 623, 1)
end

function spell1_10491(pUnit, Event) --@Consuming Shadows,Self--
pUnit:FullCastSpellOnTarget(17715,pUnit)
pUnit:RegisterEvent('Sorts_10491', 15000, 1)
end

function spell2_10491(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17620,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_10491', 5000, 1)
end

function Sorts_10491(pUnit, Event)
local choix_sorts_10491 = math.random(0, 2)
if choix_sorts_10491 == 0 then
pUnit:RegisterEvent('spell0_10491', 1, 1)
end
if choix_sorts_10491 == 1 then
pUnit:RegisterEvent('spell1_10491', 1, 1)
end
if choix_sorts_10491 == 2 then
pUnit:RegisterEvent('spell2_10491', 1, 1)
end
end

function mob10491_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10491', math.random(1500, 3000), 1)
end

function mob10491_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10491_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10491_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10491, 1, 'mob10491_Action')
RegisterUnitEvent(10491, 2, 'mob10491_Leave')
RegisterUnitEvent(10491, 3, 'mob10491_Kill')
RegisterUnitEvent(10491, 4, 'mob10491_Die')
